package com.gzhryc.net_marketing.supplier.pay.dao.db;

import java.util.Date;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.annotaion.UniqueKey;
import com.gzhryc.net_marketing.core.enums.EGoodsClassify;
import com.gzhryc.net_marketing.core.enums.EReceiveGoodsType;
import com.gzhryc.net_marketing.core.enums.GoodsOrderEnum;

@Table(name = "supplier_business_order")
public class SupplierBusinessOrder {

	@Id(auto = false)
	@Column(name = "trade_no", notNull = true, length = 32,note = "支付订单号")
	protected String tradeNo;

	//商城项目信息
	@Column(name = "project_id", notNull = true, note = "项目ID")
	protected Long projectId;

	@Column(name = "project_name", notNull = true, length = 32,note = "项目名称")
	protected String projectName;

	@UniqueKey
	@Column(name = "project_trade_no", notNull = true,length = 32, note = "项目订单号")
	protected String projectTradeNo;

	//支付信息
	@Column(name = "pay_trade_no", length = 32, note = "云支付订单")
	protected String payTradeNo;

	@Column(notNull = true, defVal = "0", note = "订单总金额，单位：分")
	protected Integer money;

	@Column(name = "logistics_money", notNull = true, defVal = "0", note = "物流费，单位：分")
	protected Integer logisticsMoney;

	@Column(name = "pay_money", notNull = true, defVal = "0", note = "支付金额，包含物流费用，单位：分")
	protected Integer payMoney;

	@Column(name = "pay_date", note = "支付时间")
	protected Date payDate;

	//商品信息
	@Column(name = "goods_id",notNull = true)
	protected Long goodsId;

	@Column(name = "goods_code",notNull = true)
	protected String goodsCode;

	@Column(name = "goods_space_id", note = "规格参数ID")
	protected Long goodsSpaceId;

	@Column(name = "goods_space_name", note = "规格参数名称")
	protected String goodsSpaceName;

	@Column(name = "goods_name", notNull = true, length = 64, note = "商品名称")
	protected String goodsName;

	@Column(name = "goods_classify", notNull = true, defVal = "1", note = "商品类型，1：实物，2：虚拟")
	protected Integer goodsClassify;

	@Column(name = "type_codes", length = 255)
	protected String typeCodes;

	@Column(name = "type_names", length = 255)
	protected String typeNames;

	@Column(name = "goods_img", length = 128, note = "商品缩略图")
	protected String goodsImg;

	@Column(name = "goods_count", notNull = true, defVal = "1", note = "商品数量")
	protected Integer goodsCount;

	@Column(name = "goods_money", notNull = true, defVal = "0", note = "单个商品费用")
	protected Integer goodsMoney;

	@Column(length = 128,note = "客户备注")
	protected String note;

	//收货地址
	@Column(name = "receive_name")
	protected String receiveName;

	@Column(name = "receive_phone")
	protected String receivePhone;

	@Column(name = "receive_province", note = "收货地址省份")
	protected String receiveProvince;

	@Column(name = "receive_address", length = 255)
	protected String receiveAddress;

	//物流信息
	@Column(name = "logistics_company_id", note = "物流公司ID")
	protected String logisticsCompanyId;

	@Column(name = "logistics_company", note = "物流公司")
	protected String logisticsCompany;

	@Column(name = "logistics_trade_no", length = 64, note = "物流单号")
	protected String logisticsTradeNo;

	//发货信息
	@Column(name = "deliver_goods_note", length = 255, note = "发货备注")
	protected String deliverGoodsNote;

	@Column(name = "deliver_goods_date", note = "发货时间")
	protected Date deliverGoodsDate;

	//收货方式
	@Column(name = "receive_goods_type", note = "收货类型，1:系统默认，2：物流查询，3：用户确认，4：客服确认")
	protected Integer receiveGoodsType;

	@Column(name = "receive_goods_date", note = "收货时间")
	protected Date receiveGoodsDate;

	@Column(name = "supply_state", notNull = true, defVal = "1", note = "供货状态")
	protected Integer supplyState;

	@Column(notNull = true, defVal = "1")
	protected Integer state;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	@Column(name = "create_date")
	protected Date createDate;

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectTradeNo() {
		return projectTradeNo;
	}

	public void setProjectTradeNo(String projectTradeNo) {
		this.projectTradeNo = projectTradeNo;
	}

	public String getPayTradeNo() {
		return payTradeNo;
	}

	public void setPayTradeNo(String payTradeNo) {
		this.payTradeNo = payTradeNo;
	}

	public Integer getMoney() {
		return money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	public Integer getLogisticsMoney() {
		return logisticsMoney;
	}

	public void setLogisticsMoney(Integer logisticsMoney) {
		this.logisticsMoney = logisticsMoney;
	}

	public Integer getPayMoney() {
		return payMoney;
	}

	public void setPayMoney(Integer payMoney) {
		this.payMoney = payMoney;
	}

	public Date getPayDate() {
		return payDate;
	}

	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public Long getGoodsSpaceId() {
		return goodsSpaceId;
	}

	public void setGoodsSpaceId(Long goodsSpaceId) {
		this.goodsSpaceId = goodsSpaceId;
	}

	public String getGoodsSpaceName() {
		return goodsSpaceName;
	}

	public void setGoodsSpaceName(String goodsSpaceName) {
		this.goodsSpaceName = goodsSpaceName;
	}

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Integer getGoodsClassify() {
		return goodsClassify;
	}

	public void setGoodsClassify(Integer goodsClassify) {
		this.goodsClassify = goodsClassify;
	}

	public String getTypeCodes() {
		return typeCodes;
	}

	public void setTypeCodes(String typeCodes) {
		this.typeCodes = typeCodes;
	}

	public String getTypeNames() {
		return typeNames;
	}

	public void setTypeNames(String typeNames) {
		this.typeNames = typeNames;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public Integer getGoodsCount() {
		return goodsCount;
	}

	public void setGoodsCount(Integer goodsCount) {
		this.goodsCount = goodsCount;
	}

	public Integer getGoodsMoney() {
		return goodsMoney;
	}

	public void setGoodsMoney(Integer goodsMoney) {
		this.goodsMoney = goodsMoney;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getReceiveName() {
		return receiveName;
	}

	public void setReceiveName(String receiveName) {
		this.receiveName = receiveName;
	}

	public String getReceivePhone() {
		return receivePhone;
	}

	public void setReceivePhone(String receivePhone) {
		this.receivePhone = receivePhone;
	}

	public String getReceiveProvince() {
		return receiveProvince;
	}

	public void setReceiveProvince(String receiveProvince) {
		this.receiveProvince = receiveProvince;
	}

	public String getReceiveAddress() {
		return receiveAddress;
	}

	public void setReceiveAddress(String receiveAddress) {
		this.receiveAddress = receiveAddress;
	}

	public String getLogisticsCompanyId() {
		return logisticsCompanyId;
	}

	public void setLogisticsCompanyId(String logisticsCompanyId) {
		this.logisticsCompanyId = logisticsCompanyId;
	}

	public String getLogisticsCompany() {
		return logisticsCompany;
	}

	public void setLogisticsCompany(String logisticsCompany) {
		this.logisticsCompany = logisticsCompany;
	}

	public String getLogisticsTradeNo() {
		return logisticsTradeNo;
	}

	public void setLogisticsTradeNo(String logisticsTradeNo) {
		this.logisticsTradeNo = logisticsTradeNo;
	}

	public String getDeliverGoodsNote() {
		return deliverGoodsNote;
	}

	public void setDeliverGoodsNote(String deliverGoodsNote) {
		this.deliverGoodsNote = deliverGoodsNote;
	}

	public Date getDeliverGoodsDate() {
		return deliverGoodsDate;
	}

	public void setDeliverGoodsDate(Date deliverGoodsDate) {
		this.deliverGoodsDate = deliverGoodsDate;
	}

	public Integer getReceiveGoodsType() {
		return receiveGoodsType;
	}

	public void setReceiveGoodsType(Integer receiveGoodsType) {
		this.receiveGoodsType = receiveGoodsType;
	}

	public Date getReceiveGoodsDate() {
		return receiveGoodsDate;
	}

	public void setReceiveGoodsDate(Date receiveGoodsDate) {
		this.receiveGoodsDate = receiveGoodsDate;
	}

	public Integer getSupplyState() {
		return supplyState;
	}

	public void setSupplyState(Integer supplyState) {
		this.supplyState = supplyState;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getPayMoneyStr() {
		return NumberTools.getMoneyStr(this.payMoney);
	}

	public String getGoodsMoneyStr() {
		return NumberTools.getMoneyStr(this.goodsMoney);
	}

	public String getMoneyStr() {
		return NumberTools.getMoneyStr(this.money);
	}

	public String getLogisticsMoneyStr() {
		return NumberTools.getMoneyStr(this.logisticsMoney);
	}

	public String getStateName() {
		return GoodsOrderEnum.State.note(this.state);
	}

	public String getGoodsClassifyName() {
		return EGoodsClassify.note(this.getGoodsClassify());
	}

	public String getReceiveTypeName() {
		return EReceiveGoodsType.note(this.receiveGoodsType);
	}

	public String getSupplyStateName() {
		return GoodsOrderEnum.SupplyState.note(this.supplyState);
	}
}
